<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1{
            padding: 10px;
            border: 3px solid #000;
        }
        /*.div2{
            float: left;
            padding: 10px;
            border: 3px solid red;
        } */
        .box{
            background: #d32d2d;
            padding: 10px;
            width: 500px;
            height: 400px;
        }
        .rule1{
            float: left;
            margin: 10px;
            padding: 10px;
            background: #eee;
            width: 100px;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="div1">
        <img src="https://img.36krcdn.com/20220426/v2_5814a8cee8d049f18c53abadea45dbf9_img_png" alt="">
    </div>
    <div class="box">
        <!-- 行内元素 不能设置宽高，内容撑起来，块级相关的不要做 -->
        <div class="rule1">首页</div>
        <div class="rule1">发现</div>
        <div class="rule1">动态</div>
        <div class="rule1">我的</div>
    </div>
    <!-- block inline 之外的
    float flex grid table-cell inline-block 创建新的格式 上下文
    <div class="div2">
        <img src="https://img.36krcdn.com/20220426/v2_04369405321b4c8cb846b53988028a75_img_png?x-oss-process=image/resize,m_mfit,w_600,h_400,limit_0/crop,w_600,h_400,g_center" alt="">
    </div> -->
</body>
</html>